home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 151-175 / disk_166 / stevie / porting.doc < prev    next >
Text File  |  1992-05-06  |  2KB  |  71 lines

  1.  
  2.          Release Notes for STEVIE - Version 3.10a
  3.  
  4.                    Porting
  5.  
  6.              Tony Andrews -  March 6, 1988
  7.  
  8.  
  9.     Porting the editor is a relatively simple task. Most of the
  10. code is pretty machine-independent. For each environment, there is
  11. a file of routines that perform various low-level operations that
  12. tend to vary a lot from one machine to another. Another file contains
  13. the escape sequences to be used for each machine.
  14.  
  15.     The machine-dependent files currently used are:
  16.  
  17. tos.c:     Atari ST - ifdef for either Megamax or Alcyon
  18. tos.h
  19.  
  20. unix.c:     UNIX System V
  21. unix.h
  22.  
  23. os2.c:     Microsoft OS/2
  24. os2.h
  25.  
  26. amiga.c: Amiga
  27. amiga.h
  28.  
  29. bsd.c:   BSD 4.3 UNIX
  30. bsd.h
  31.  
  32.     Each of these files are around 150 lines long and deal with
  33. low-level issues like character I/O to the terminal, terminal
  34. initialization, cursor addressing, and so on. There are different
  35. tradeoffs to be made depending on the environment. For example, the
  36. UNIX version buffers terminal output because of the relatively high
  37. overhead of system calls. A quick look at the files will make it clear
  38. what needs to be done in a new environment.
  39.  
  40.     Terminal escape sequences are in the file "term.h". These are
  41. defined statically, for the time being. There is some discussion in
  42. term.h regarding which sequences are optional and which are not. The
  43. editor is somewhat flexible in dealing with a lack of terminal
  44. capabilities.
  45.  
  46.     The character set is in the file "charset.c".
  47.  
  48.     Because not all C compilers support command line macro definitions,
  49. the #define's for system-specific macros are placed at the beginning of the
  50. file 'stevie.h'. If you port to a new system, add another line there to
  51. define the macro you choose for your port.
  52.  
  53.     The basic process for doing a new port is:
  54.  
  55.     1. Come up with a macro name to use when ifdef'ing your system-
  56.        specific changes. Add a line at the top of 'stevie.h' to define
  57.        the macro name you've chosen.
  58.  
  59.     2. Look at amiga.c, bsd.c, unix.c, tos.c, and os2.c and copy the one
  60.        that comes closest to working on your system. Then modify your new
  61.        file as needed.
  62.  
  63.     3. Look at term.h and edit the file appropriately adding a new
  64.        set of escape sequence definitions for your system.
  65.  
  66.     4. If you haven't already, get a copy of Henry Spencer's regular
  67.        expression library and compile it. This has been very simple
  68.        every time I've done it.
  69.  
  70.     5. Compiling and debug the editor.
  71.